<template>
  <div>
    <el-form
      :inline="true"
      :model="formInline"
      class="demo-form-inline"
    >

      <el-form-item label="选科情况">
        <el-select
          v-model="formInline.region"
          placeholder="选科情况"
        >
          <el-option
            label="物理"
            value="shanghai"
          ></el-option>
          <el-option
            label="化学"
            value="beijing"
          ></el-option>
          <el-option
            label="地理"
            value="beijing"
          ></el-option>
        </el-select>
      </el-form-item>

      <el-form-item>
        <el-button
          type="primary"
          @click="onSubmit"
        >查询</el-button>
      </el-form-item>
    </el-form>

    <el-table
      :data="tableData"
      border
      style="width: 100%"
    >
      <el-table-column
        type="index"
        width="50"
      >
      </el-table-column>
      <el-table-column
        prop="district"
        label="区域"
        width="180"
      >
      </el-table-column>
      <el-table-column
        prop="schoolname"
        label="学校数量"
        width="180"
      >
      </el-table-column>
      <el-table-column
        prop="teachercount"
        label="选科数量人数"
      >
      </el-table-column>
      <el-table-column
        prop="bestsubject"
        label="选科占比"
      >
      </el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="info"
            @click="handle_detail(scope.$index, scope.row)"
          >详情</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

    <script>
export default {
  data () {
    return {
      formInline: {
        user: '',
        region: ''
      },
      tableData: [{
                    district: '天河区',
                    schoolname: '13',
                    teachercount: '2284',
                    bestsubject: '55%'
                  }, {
                    district: '荔湾区',
                    schoolname: '9',
                    teachercount: '3010',
                    bestsubject: '57%'
                  }, {
                    district: '荔湾区',
                    schoolname: '15',
                    teachercount: '3868',
                    bestsubject: '56%'
                  }, {
                    district: '越秀区',
                    schoolname: '6',
                    teachercount: '1773',
                    bestsubject: '51%'
                  },
                  {
                    district: '黄埔区',
                    schoolname: '11',
                    teachercount: '1816',
                    bestsubject: '53%'
                  }, {
                    district: '海珠区',
                    schoolname: '15',
                    teachercount: '2622',
                    bestsubject: '54%'
                  }, {
                    district: '白云区',
                    schoolname: '16',
                    teachercount: '6435',
                    bestsubject: '6%'
                  }, {
                    district: '荔湾区',
                    schoolname: '9',
                    teachercount: '3057',
                    bestsubject: '48%'
                  }, {
                    district: '海珠区',
                    schoolname: '6',
                    teachercount: '811',
                    bestsubject: '53%'
                  }, {
                    district: '白云区',
                    schoolname: '8',
                    teachercount: '1989',
                    bestsubject: '54%'
                  }, {
                    district: '荔湾区',
                    schoolname: '11',
                    teachercount: '2635',
                    bestsubject: '5%'
                  }]
    }
  },
  methods: {
    handle_detail () {
      this.$router.push('/subject_analysis/subject_combine_detail')
    },
    onSubmit () {

    }
  }
}

  </script>

  <style
    rel="stylesheet/scss"
    lang="scss"
    scoped
  >
  </style>

